Charging Session Management Method and Apparatus

ABSTRACT

The present disclosure relates to the field of mobile communications, and more specifically, to a charging session management method and apparatus. The present disclosure provides a charging session management method, where when user equipment (UE) is in a state of accessing to a network, there is an internet protocol (IP)-Connectivity access network (CAN) bearer between a Gateway and the UE, where the IP-CAN bearer is used to transmit a data flow of the UE, and a charging session exists between the Gateway and a charging system; and the method includes: when a charging session established for the IP-CAN bearer exists between the Gateway and the charging system, terminating, by the Gateway, the charging session if determining that no data flow is transmitted on the IP-CAN bearer within a time threshold; and establishing, a new charging session for the IP-CAN bearer when detecting that a data flow transmission starts to be transmitted on the IP-CAN bearer.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2014/072857, filed on Mar. 04, 2014, which is hereby incorporatedby reference in its entirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of mobilecommunications, and more specifically, to a charging session managementmethod and apparatus.

BACKGROUND

Policy and Charging control (PCC) is a policy and charging controlmechanism defined by the 3rd Generation Partnership Project (3GPP). Anarchitecture of PCC is shown in FIG. 1.

A core of the PCC mechanism is: When establishing a data flows bearer, aGateway device requests a data flow control and charging policy from aPolicy and Charging Rules Function (PCRF) entity; according tosubscriber information stored in a Subscription Profile Repository(SPR), information about a bearer layer provided by the Gateway, andsome local policies configured in the PCRF by an operator, the PCRFgenerates a dynamic charging and control policy about a service dataflow or determines a to-be-activated static charging and control policyabout a service data flow, and delivers a command to the Gateway toinstall the generated dynamic policy or activate the determined staticpolicy that is stored in a Policy and Charging Enforcement Function(PCEF); and the Gateway performs resource allocation, data flow control,and charging control according to the installed/activated policy. Themechanism can implement precise control over a service data flowaccording to an operator policy, so as to implement refined operation onbandwidth.

Related concepts are defined as follows:

The PCEF entity is located in the Gateway and is configured to execute adynamic or static control policy. The Gateway includes an endpointestablished on a bearer, such as a Gateway GPRS support node (GGSN) or aPDN Gateway (P-GW).

The PCRF entity is responsible for generation of policies of Quality ofService (QoS), bandwidth, gating control, charging, or the like whenuser equipment uses a service in a home network.

The SPR stores user subscription data and maps to an entity in anexisting system, where the entity may be a home location register (HLR),a Home Subscriber Server, (HSS), an Online Charging System (OCS), or thelike.

A Traffic Detection Function (TDF) unit is configured to detect anapplication. Detection herein does not refer to parsing using a 5-tupleat a network layer, but refers to deep packet parsing.

The OCS receives a charging event and user use information that arereported by the PCEF after the PCEF is triggered.

A rating group (also referred to as Rating Group) is used to aggregateone or more services having same costs (also referred to as cost) or asame rating (also referred to as Rating) type, and is used for chargingsystem rating.

In a long term evolution (LTE) network, a user mobile phone is alwaysconnected to a network (also referred to as Always-on). To implementAlways-on, when being attached, the mobile phone establishes a defaultbearer (also referred to as Default Bearer), where the bearer exists atan entire stage in which the user is connected to the network.

When a mobile phone is in an Always-on mode, no matter whether a useruses a service, at least one Internet Protocol (IP)-Connectivity AccessNetwork (CAN) Session exists. One IP-CAN Session involves sessionestablishment on multiple interfaces such as Gy and Sd, and the sessionis maintained in entire IP-CAN Session duration, which causes a waste ofresources of an OCS, a PCEF, or the like.

SUMMARY

To resolve a problem that resources on a network node such as an OCS anda PCEF are wasted in an existing session establishment manner, thepresent disclosure provides several charging session management methodsand further provides implementation of a Gateway and a PCRF entity forimplementing the charging session management methods, which include:

According to a first aspect, an embodiment of the present disclosureprovides a charging session management method, where when user equipment(UE) is in a state of accessing to a network, there is an IP-CAN bearerbetween a Gateway and the UE, where the IP-CAN bearer is used totransmit a data flow of the UE, and a charging session exists betweenthe Gateway and a charging system; and the method includes: terminating,by the Gateway, the charging session when a charging session establishedfor the IP-CAN bearer exists between the Gateway and the charging systemand if determining that no data flow is transmitted on the IP-CAN bearerwithin a time threshold; and establishing, by the Gateway, a newcharging session for the IP-CAN bearer when detecting that a data flowtransmission starts to be transmitted on the IP-CAN bearer.

In a first optional solution with reference to the first aspect, whenthe Gateway is to establish a first IP-CAN bearer with the UE, themethod further includes: establishing, by the Gateway, the first IP-CANbearer with the UE, and monitoring a data flow transmission status onthe first IP-CAN bearer; and establishing, by the Gateway, a chargingsession with the charging system when detecting that a data flowtransmission starts to be transmitted on the first IP-CAN bearer.

In a second optional solution with reference to the first optionalsolution, when the first IP-CAN bearer is to be established, the methodfurther includes: sending, by the Gateway, a charging and control policyrequest to a PCRF after receiving a request for establishing the firstIP-CAN bearer from the UE; receiving, by the Gateway, a result that isof authentication performed by an OCS on the UE and that is carried in acharging and control policy response returned by the PCRF, where theauthentication performed by the OCS on the UE is completed by means of asession channel between the PCRF and the OCS; and establishing, by theGateway, the first IP-CAN bearer when determining that the UE has beenauthenticated.

In a third optional solution with reference to the first aspect, if oneIP-CAN session includes one or more IP-CAN bearers, and the one or moreIP-CAN bearers use a charging session established for a first IP-CANbearer, the method further includes terminating, by the Gateway, thecharging session when detecting that no data flow is transmitted on theone or more IP-CAN bearers within the time threshold.

In a fourth optional solution with reference to the third optionalsolution, when the charging system is an OCS, the method furtherincludes: receiving, by the Gateway, quotas that are allocated fordifferent rating groups (RGs) in the IP-CAN Session and that aredelivered by the charging system; using, by the Gateway, a quota forflows that correspond to an RG and that are on all IP-CAN Bearers in thesame IP-CAN Session; collecting, by the Gateway, data flow informationon different IP-CAN Bearers, and separately reporting the collected dataflow information when a reporting condition is met, where the data flowinformation includes QoS information of the IP-CAN Bearers so that thecharging system charges the data flows according to the QoS information.

According to a second aspect, an embodiment of the present disclosureprovides a charging session management method, where an IP-CAN bearerhas not been established between UE and a Gateway, and the methodincludes: receiving, by the Gateway, an IP-CAN bearer establishmentrequest sent by the UE; establishing, by the Gateway, an IP-CAN bearerwith the UE, and monitoring a data flow transmission status on theIP-CAN bearer; and when detecting that a data flow transmission startsto be transmitted on the IP-CAN bearer related to the UE, establishing,by the Gateway, a charging session with a charging system.

In a first optional solution with reference to the second aspect, whenthe IP-CAN bearer is to be established, the method further includes:sending, by the Gateway, a charging and control policy request to a PCRFafter receiving the IP-CAN bearer establishment request from the UE;receiving, by the Gateway, a result that is of authentication performedby an OCS on the UE and that is carried in a charging and control policyresponse returned by the PCRF, where the authentication performed by theOCS on the UE is completed by means of a session channel between thePCRF and the OCS; and establishing, by the Gateway, the IP-CAN bearerwhen determining that the UE has been authenticated.

In a second optional solution with reference to the second aspect or thefirst optional solution, if one IP-CAN session includes one or moreIP-CAN bearers, and the one or more IP-CAN bearers use a chargingsession established for a first IP-CAN bearer, the method furtherincludes terminating, by the Gateway, the charging session whendetecting that no data flow is transmitted on the one or more IP-CANbearers within a time threshold.

In a third optional solution with reference to the second optionalsolution, when the charging system is an OCS, the method furtherincludes: receiving, by the Gateway, quotas that are allocated fordifferent rating groups RGs in the IP-CAN Session and that are deliveredby the charging system; using, by the Gateway, a quota for flows thatcorrespond to an RG and that are on all IP-CAN Bearers in the sameIP-CAN Session; collecting, by the Gateway, data flow information ondifferent IP-CAN Bearers, and separately reporting the collected dataflow information when a reporting condition is met, where the data flowinformation includes QoS information of the IP-CAN Bearers so that thecharging system charges the data flows according to the QoS information.

According to a third aspect, an embodiment of the present disclosureprovides a charging session management method, where an IP-CAN sessionexists between UE and a Gateway, an Sd session needs to be establishedbetween a PCRF and a TDF for the IP-CAN session, and the PCRF delivers,based on the session, an application detection and control ruleApplication Detection and Control (ADC) rule; and the method includes:if the Sd session is established between the PCRF and the TDF for theIP-CAN session, after receiving a data flow transmission end eventreported by the Gateway and if determining that no data flowtransmission event that is in the IP-CAN session and that is reported bythe Gateway is received within a time threshold, terminating, by thePCRF, the Sd session established for the IP-CAN session; and whenreceiving another data flow transmission event that is in the IP-CANsession and that is reported by the Gateway, establishing, by the PCRF,a new Sd session with the TDF for the IP-CAN session, so as to deliver anew ADC rule.

According to a fourth aspect, an embodiment of the present disclosureprovides a charging session management method, where when UE is in astate of accessing to a network, there is an IP-CAN bearer between aGateway and the UE, where the IP-CAN bearer is used to transmit a dataflow of the UE, and a charging session exists between the Gateway and acharging system; and the method includes: receiving, by an OCS, acharging session request message sent by the Gateway; and determining atime threshold for terminating the charging session, and delivering thetime threshold to the Gateway so that the Gateway monitors a sessiontermination condition according to the time threshold, and terminatesthe charging session when the termination condition is met; ordetermining, by the OCS, a time threshold for terminating the chargingsession, monitoring a quota delivered for an IP-CAN bearer correspondingto the charging session, starting timing when there is no occupied quotaon the IP-CAN bearer corresponding to the charging session, and whenreceiving no new quota request for the IP-CAN bearer corresponding tothe charging session within the time threshold, delivering a request ofterminating the charging session to the Gateway so that the Gatewayterminates the charging session according to the session terminationrequest.

According to a fifth aspect, an embodiment of the present disclosureprovides a Gateway for implementing a charging session managementmethod, where the Gateway includes: a processor, a data transceiver, asignaling transceiver, and a memory, which interact with each otherusing a bus, where the memory is configured to store code and a timethreshold that are for the Gateway to perform an operation; the datatransceiver is configured to transmit a data flow to UE, and is furtherconfigured to transmit the data flow to another node on a network; thesignaling transceiver is configured to transmit content of a chargingsession to a charging system, and is further configured to transmit acharging and control policy to a PCRF; and the processor is configuredto read data from the memory and complete the following functions basedon the data transceiver and the signaling transceiver: when the chargingsession established for an IP-CAN bearer exists between the signalingtransceiver and the charging system, the processor terminates thecharging session if determining that no data flow is transmitted on theIP-CAN bearer within the time threshold; and the processor establishes anew charging session for the IP-CAN bearer when detecting that data flowtransmission starts on the IP-CAN bearer.

According to a sixth aspect, an embodiment of the present disclosureprovides a Gateway for implementing a charging session managementmethod, where the Gateway includes: a processor, a data transceiver, asignaling transceiver, and a memory, which interact with each otherusing a bus, where the memory is configured to store code and a timethreshold that are for the Gateway to perform an operation; the datatransceiver is configured to transmit a data flow to UE, and is furtherconfigured to transmit the data flow to another node on a network; thesignaling transceiver is configured to transmit content of a chargingsession to a charging system, and is further configured to transmit acharging and control policy to a PCRF; and the processor is configuredto read data from the memory and complete the following functions basedon the data transceiver and the signaling transceiver: the datatransceiver receives an IP-CAN bearer establishment request sent by theUE; the processor establishes an IP-CAN bearer with the UE using thedata transceiver, and monitors data flow transmission on the IP-CANbearer; and the processor establishes the charging session between thesignaling transceiver and the charging system when detecting that a dataflow transmission starts to be transmitted on the IP-CAN bearer relatedto the UE.

According to a seventh aspect, an embodiment of the present disclosureprovides a policy and charging rules function entity for implementing acharging session management method, where the policy and charging rulesfunction entity includes: a processor, a signaling transceiver, and amemory, which interact with each other using a bus, where the memory isconfigured to store code for a Gateway to perform an operation; thesignaling transceiver is configured to transmit signaling to a chargingsystem, is further configured to transmit a charging and control policyto a PCEF, and is further configured to transmit content in an Sdsession to a TDF; and the processor is configured to read data from thememory and complete the following functions based on the datatransceiver and the signaling transceiver: if the Sd session isestablished between the signaling transceiver and the TDF for the IP-CANsession, after receiving a data flow transmission end event reported bythe PCEF and if determining that no data flow transmission event that isin the IP-CAN session and that is reported by the Gateway is receivedwithin a time threshold, the processor terminates the Sd sessionestablished for the IP-CAN session; and when receiving, using thesignaling transceiver, another data flow transmission event that is inthe IP-CAN session and that is reported by the Gateway, the processorestablishes a new Sd session with the TDF for the IP-CAN session, so asto deliver a new application detection and control rule ADC rule.

In the embodiments of the present disclosure, an idea in the prior artthat an IP-CAN bearer and a charging session are tightly coupled isrectified, and existence of the charging session is associated with adata flow on the IP-CAN bearer. Therefore, in a case in which there isan IP-CAN bearer between UE and a Gateway but there is no data flow onthe IP-CAN bear, the charging session can be terminated; and when thereis another data flow on the IP-CAN bearer, a new charging session can beestablished. In this way, effective use of resources of a chargingsystem and a Gateway is ensured and resources wasted for maintaining acharging session are reduced.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments or theprior art. The accompanying drawings in the following description showmerely some embodiments of the present disclosure, and a person ofordinary skill in the art may still derive other drawings from theseaccompanying drawings without creative efforts.

FIG. 1 is a schematic architectural diagram of a PCC in the prior art;

FIG. 2 is a schematic architectural diagram of charging sessionmanagement according an embodiment of the present disclosure;

FIG. 3 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 4 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 5 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 6 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 7 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 8 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 9 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure;

FIG. 10 is a schematic structural diagram of a Gateway according to anembodiment of the present disclosure;

FIG. 11 is a schematic structural diagram of a Gateway according to anembodiment of the present disclosure; and

FIG. 12 is a schematic structural diagram of a policy and charging rulesfunction according to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present disclosure with reference to the accompanyingdrawings in the embodiments of the present disclosure. The describedembodiments are some but not all of the embodiments of the presentdisclosure. All other embodiments obtained by a person of ordinary skillin the art based on the embodiments of the present disclosure withoutcreative efforts shall fall within the protection scope of the presentdisclosure.

The term “and/or” in the present disclosure describes only anassociation relationship for describing associated objects andrepresents that three relationships may exist. For example, A and/or Bmay represent the following three cases: Only A exists, both A and Bexist, and only B exists. In addition, the character “/” in thisspecification generally indicates an “or” relationship between theassociated objects.

In the embodiments of the present disclosure, to help understandimplementation of the present disclosure using interfaces that haveexisted between network nodes, in some cases, a specific solution isdescribed in a manner of directly replacing a Gateway with a networknode PCEF.

As shown in FIG. 2, FIG. 2 is a schematic diagram of a system frameworkaccording to an embodiment of the present disclosure. A PCRF 102 and aPCEF 104 are interconnected using a Gx interface. A session establishedbased on the Gx interface is also referred to as a Gx session in thepresent disclosure. The Gx session is used to complete delivery of acontrol policy and a charging policy. The Gx interface is asession-level interface. A granularity of the Gx interface on an evolvedpacket core (EPC) is an IP-CAN session. That the Gx interface is asession-level interface and a granularity of the Gx interface on an EPCis an IP-CAN session refers to: On the EPC network, for the IP-CANSession established between UE and a Gateway, only one Gx session isestablished between the PCRF and the PCEF for the IP-CAN Session; anddifferent IP-CAN Bearers included in the IP-CAN Session completedownloading of the control and charging policy using the established Gxsession. The PCEF is generally disposed in the Gateway, and on the EPC,the Gateway refers to a P-GW.

The PCRF 102 and a TDF 103 are interconnected using an Sd interface, andimplement delivery of an ADC rule using a corresponding Sd session. TheSd interface is a session-level interface, which means that for theIP-CAN Session established between the UE and the Gateway (also referredto as PCEF), only one Sd session is established between the PCRF 102 andthe TDF 103 for the IP-CAN Session.

The PCEF 104 and a charging system are interconnected using a charginginterface, where the charging interface is used by the PCEF 104 toreport collected relevant use information of data flows. If the chargingsystem is an OCS 101, the charging interface is a Gy interface. The Gyinterface is further used for transferring a Credit Control (CC)message, for example, requesting for a quota (also referred to asquota). The charging interface is a bearer-level interface. When abearer environment is the EPC, a granularity of the Gy interface is anIP-CAN bearer. That the Gy interface is a bearer-level interface and agranularity of the Gy interface on the EPC is an IP-CAN bearer refersto: On the EPC network, for one IP-CAN Bearer in the IP-CAN Sessionbetween the UE and the Gateway (where the IP-CAN Bearer is also referredto as an IP connection bearer), one Gy session is established betweenthe PCEF and the OCS for the IP-CAN Bearer. The charging systemmentioned in the embodiments of the present disclosure may be, if nospecial instruction is provided, the online charging system OCS 101 oran Offline Charging System, (OFCS), the OFCS is not shown in FIG. 2;refer to FIG. 1. If the charging system is the OFCS, a charging sessionrefers to a Gz session established on a Gz interface, and the Gzinterface is a bearer-level interface. Also, a serving gateway (S-GW)105 is connected to the PCEF 104.

After main interfaces and network nodes involved in the presentdisclosure are described, content of the present disclosure iselaborated next in a method process form. When UE is in a state ofalready accessing to a network, there is always an IP-CAN bearer betweena Gateway and the UE (which is a feature of an Always-on network), wherethe IP-CAN bearer is used to transmit a data flow of the UE, and acharging session exists between the Gateway and a charging system. FIG.3 is a schematic flowchart of a charging session management methodaccording an embodiment of the present disclosure, including:

Step 22: When a charging session established for the IP-CAN bearerexists between the Gateway and the charging system, the Gatewayterminates the charging session if determining that no data flow istransmitted on the IP-CAN bearer within a time threshold.

The time threshold may be preconfigured in the Gateway, may be acquiredby the Gateway from the charging system using a charging sessioninterface, or may be carried in a charging and control policy acquiredby the Gateway from a PCRF. In step 22, the Gateway terminates, usingany one of the following manners, the charging session if determiningthat no data flow is transmitted on the IP-CAN bearer within a timethreshold may be :

(1) The Gateway monitors the IP-CAN bearer; when there is no data flowon the IP-CAN bearer, the Gateway starts timing; and when determiningthat no data flow is transmitted on the IP-CAN bearer within the timethreshold, the Gateway terminates the charging session established forthe IP-CAN bearer.

(2) When determining that there is no occupied quota on the IP-CANbearer, the Gateway starts timing; and when detecting that no new dataflow is transmitted on the IP-CAN bearer within the time threshold, theGateway terminates the charging session established for the IP-CANbearer.

(3) An OCS starts timing when there is no quota occupied on the IP-CANbearer; when no new quota request is received from the Gateway withinthe time threshold, the OCS sends a session termination request to theGateway; and after receiving the session termination request, theGateway terminates the charging session. The new quota request isgenerally initiated by the Gateway to the OCS when detecting that a dataflow is being transmitted.

In manner (2) and manner (3), that there is no occupied quota on theIP-CAN bearer includes: a quota applied for the IP-CAN bearer by theGateway is invalid because of timeout caused by idleness, a quotaapplied for the IP-CAN bearer by the Gateway is released after beingnormally used, or the like.

Preferably, the data flow monitored by the Gateway and described in theembodiments of the present disclosure is a data flow involving charging,and a heartbeat packet for maintaining an IP-CAN bearer, a signalingmessage for establishing an IP-CAN bearer, or the like does not belongto the data flow involving charging.

Step 24: The Gateway establishes a new charging session for the IP-CANbearer when detecting that a data flow transmission starts to betransmitted on the IP-CAN bearer.

In this embodiment, a data flow transmission status on an IP-CAN bearerbetween UE and a Gateway is monitored, implementing dynamicestablishment and termination of a charging session, and furtherensuring effective use of charging system resources. Therefore, when theIP-CAN bearer is in an idle state, a charging system resource allocatedby a charging system for the IP-CAN bearer can be released.

In the embodiment corresponding to FIG. 3, when the Gateway is toestablish a first IP-CAN bearer with the UE, the method furtherincludes: establishing, by the Gateway, the first IP-CAN bearer with theUE and monitoring a data flow transmission status on the first IP-CANbearer; and when the Gateway detects that a data flow transmissionstarts to be transmitted on the first IP-CAN bearer, establishing, bythe Gateway, a charging session with the charging system for the firstIP-CAN bearer.

The first IP-CAN bearer is also referred to as a default bearer (alsoreferred to as Default Bearer) on an EPC, and is an IP-CAN bearer thatis initiated earliest when the UE turns from an offline state to a stateof accessing to the EPC. The UE usually initiates a default bearerestablishment request to the Gateway when the UE is powered on or ischanged from an airplane mode to a network mode. Then after the defaultbearer is established, a data service involving charging is notnecessarily started. In this way, in this embodiment, an extendedsolution is provided: when no data flow (which may be a data flowinvolving charging) is transmitted on the IP-CAN bearer, the chargingsession between the Gateway and the charging system is not establishedimmediately, and the charging session is established only when a dataflow involving charging is transmitted on the IP-CAN bearer. Therefore,according to this improvement, a charging session is established for theIP-CAN bearer when a data service involving charging is transmitted onthe IP-CAN bearer.

In a possible implementation solution, based on the embodimentcorresponding to FIG. 3, when an operator establishes the first IP-CANbearer for the UE, the UE further needs to be authenticated, and in thiscase, the foregoing extended solution is used for the charging sessionbetween the Gateway (which may be a PCEF) and the charging system and isestablished when the Gateway detects transmission of the data flow.Therefore, the foregoing authentication process needs to be completedusing another interface that has been established. , the Gatewayreceives a request for establishing the first IP-CAN bearer from the UE,and sends a charging and control policy request to the PCRF; the Gatewayreceives a result that is of authentication performed by the chargingsystem on the UE and that is carried in a charging and control policyresponse returned by the PCRF, where the result of the authenticationperformed by the charging system on the UE is completed by means of asession channel between the PCRF and the charging system; whendetermining that the authentication succeeds, the Gateway establishesthe first IP-CAN bearer with the UE; or when determining thatauthentication fails, the Gateway rejects establishment of the bearer.

In addition to carrying the result of the authentication performed bythe charging system on the UE, the charging and control policy responsereturned by the PCRF may further carry charging session establishmentdelay instruction information. The Gateway establishes the first IP-CANbearer according to the result of the authentication, and determines,according to the charging session establishment delay instructioninformation, to establish the charging session with the charging systemfor the first IP-CAN bearer only when detecting that transmission of thedata flow (which may be the data flow involving charging) starts on thefirst IP-CAN bearer.

Preferably, the result of the authentication may be directly used as thecharging session establishment delay instruction information, and inthis case, the charging and control policy response returned by the PCRFcarries only the result of the authentication. The Gateway establishesthe first IP-CAN bearer according to the result of the authentication,and determines, according to the result of the authentication, toestablish the charging session with the charging system for the firstIP-CAN bearer only when detecting that transmission of the data flow(which may be the data flow involving charging) starts on the firstIP-CAN bearer. In this exemplary solution, the result of theauthentication has a same function as that of the foregoingestablishment delay instruction information.

Generally, transmission of a data flow starts after the UE initiates anIP-CAN bearer establishment request. Therefore, as shown in FIG. 4,implementation of the present disclosure and an optional extendedsolution are described as follows with reference to a process in whichthe UE initiates an IP-CAN bearer establishment request.

Step 201: A Gateway receives an IP-CAN bearer establishment requestinitiated by UE.

The IP-CAN bearer establishment request herein includes: a defaultbearer establishment request and/or a dedicated bearer establishmentrequest. The default bearer establishment request is a specificmanifestation of a request for establishing the first IP-CAN bearer inthis embodiment. The dedicated bearer establishment request is a requestthat is initiated by the UE to the Gateway and that is for establishinganother IP-CAN bearer that is different from the first IP-CAN bearer,and is used to provide dedicated QoS for a particular service. TheIP-CAN bearer establishment request message belongs to known techniquesand therefore is not described herein.

Step 202: The Gateway monitors data flow transmission on the IP-CANbearer.

A manner of executing step 202 by the Gateway may be a default mannerset in the Gateway. That is, to establish a charging sessioncorresponding to any IP-CAN bearer, the Gateway first monitors data flowtransmission on the IP-CAN bearer, and when a data flow transmissionstarts to be transmitted on the IP-CAN bearer, establishes the chargingsession with a charging system for the IP-CAN bearer.

Besides the default manner, the following manner may also be acceptable:the Gateway monitors data flow transmission according to a chargingsession establishment delay instruction, and establishes a chargingsession with a charging system for a corresponding IP-CAN bearer when adata flow transmission starts to be transmitted. The charging sessionestablishment delay instruction may be added to a charging and controlpolicy requested by the Gateway to a PCRF. In this embodiment, when theUE needs to be authenticated, the solution of completing authenticationon the UE using a session channel between the PCRF and an OCS in theembodiment corresponding to FIG. 3 may be used.

Preferably, the data flow refers to a data flow that needs to becharged.

Step 203: The Gateway establishes a charging session with a chargingsystem for the IP-CAN bearer when detecting that a data flowtransmission starts to be transmitted on the IP-CAN bearer.

When multiple IP-CAN bearers are established in the Gateway, the Gatewaymay monitor data flow transmission on the multiple IP-CAN bearerssimultaneously, and when a data flow is transmitted on one of the IP-CANbearers, establish a charging session for the IP-CAN bearer on which thedata flow is transmitted.

In this embodiment, a manner in the prior art in which a Gatewayestablishes a corresponding charging session with a charging systemafter establishing an IP-CAN bearer is improved. A Gateway monitors adata flow transmission status on the established IP-CAN bearer, andestablishes a charging session for the IP-CAN bearer only when detectingthat a data flow is transmitted. Considering that a particular timeinterval probably exists in practice between establishment of an IP-CANbearer and data flow transmission initiated based on the IP-CAN bearer,if a corresponding charging session is established when the IP-CANbearer is established, a resource occupied for the charging sessionwithin the time interval is not used effectively. Therefore, in thisembodiment, resources of a charging system and a Gateway are used moreeffectively.

When the embodiment corresponding to FIG. 4 and the embodimentcorresponding to FIG. 3 are combined into a complete solution, afterstep 203, the following steps are further included. The three manners ofdetermining, by the Gateway, to terminate the charging session describedin step 22 may be broadly described in this embodiment, which is asfollows:

Step 204: The Gateway terminates the charging session when determiningthat a session termination condition is met.

The session termination condition may be preconfigured in the Gateway,may be acquired by the Gateway from the charging system using a chargingsession interface, or may be carried in a charging and control policyacquired by the Gateway from the PCRF. A manner of meeting the sessiontermination condition may be any one of the following manners, and thedata flow described in the manners is represented as an uplink ordownlink data flow.

(1) The Gateway monitors the IP-CAN bearer; in a case in which theGateway determines that no data flow is on the IP-CAN bearer, theGateway starts timing; when the Gateway detects no uplink or downlinkdata flow transmission on the corresponding IP-CAN bearer within a timethreshold, the session termination condition is met.

(2) In a case in which the Gateway determines that there is no quotaoccupied on the IP-CAN bearer, the Gateway starts timing; when no uplinkor downlink data flow is transmitted within a time threshold, thesession termination condition is met.

(3) When the Gateway receives a session termination request from thecharging system, the session termination condition is met. The sessiontermination request is sent when the charging system determines thatthere is no occupied quota corresponding to the IP-CAN bearer and no newquota request corresponding to the IP-CAN bearer is received within thetime threshold.

Step 205: When detecting that another data flow transmission starts tobe transmitted on the IP-CAN bearer, the PCEF establishes a chargingsession with the charging system for the IP-CAN bearer.

In this embodiment, when an IP-CAN bearer is established, a chargingsession is not established immediately because no service data trafficmay be involved at this time. Further, when the session terminationcondition is met, the charging session that has been established betweenthe PCEF and the charging system is terminated. In the foregoing delayand termination manners, resources used for establishing a chargingsession are reduced while user communication is ensured.

In the prior art, one or more services may include different QoS-baseddata flows. To facilitate association between the service data flows andquota sharing across an IP-CAN bearer, reduce a quota fragment, andimprove quota management efficiency of the charging system, in anembodiment of the present disclosure, quota management and use betweenthe Gateway and the charging system is improved. The exemplary solutionis applicable to both the embodiment corresponding to FIG. 3 and theembodiment corresponding to FIG. 4, and is :

If one IP-CAN session includes one or more IP-CAN bearers, the one ormore IP-CAN bearers use a charging session established for a firstIP-CAN bearer. That is, one IP-CAN session has only one chargingsession, and all IP-CAN bearers in the IP-CAN session share the chargingsession.

Further, the Gateway receives quotas that are allocated for differentrating groups RGs in the IP-CAN session (also referred to as IP-CANSession) and that are delivered by the charging system. When multipleIP-CAN Bearers corresponding to a same RG exist in the same IP-CANSession, the multiple IP-CAN Bearers share a quota allocated for the RG.

The Gateway collects data flow information on the IP-CAN Bearers, andseparately reports the collected data flow information when a reportingcondition is met, where the data flow information includes QoSinformation of the IP-CAN Bearers so that the charging system chargesthe data flows according to the QoS information.

Based on the improvement of sharing the quota allocated for the RG, thecharging session established between the Gateway and the charging systemmay be terminated in multiple possible cases, including:

(1) When the charging session is provided to only one IP-CAN Bearer(also referred to as IP-CAN bearer in the embodiments), that is, theIP-CAN Session includes only one IP-CAN bearer, when determine thattransmission of a data flow on the IP-CAN Bearer is not detected withinthe time threshold, and the Gateway terminates the charging sessionestablished for the IP-CAN bearer (which is also applicable to the othercharging session termination manners given in step 22 and step 204).

(2) When the charging session is shared by at least two IP-CAN Bearersof a same RG, that is, the IP-CAN Session includes at least two IP-CANBearers, the Gateway can terminate the charging session shared by the atleast two IP-CAN Bearers only when detecting that no data flow istransmitted on all the IP-CAN Bearers in the IP-CAN Session within thetime threshold (which is also applicable to the other charging sessiontermination manners given in step 22 and step 204).

Based on the bearer-level charging session in step 22 or step 204, thefollowing describes, with a specific example, in detail how to implementsession termination in a session-level charging session. The timethreshold is a session keeping time threshold, and the IP-CAN sessionrefers to an IP-CAN Session, where the IP-CAN Session includes one ormore IP-CAN bearers (which refer to: IP-CAN Bearers). A method fordetermining to terminate the charging session includes:

Method 1: The Gateway receives a session keeping time threshold carriedin charging information that is sent by an OCS through a Gy interface,where the session keeping time threshold may be named asSession-Keeping-Time. After receiving the session keeping timethreshold, the Gateway starts timing when transmission of a data flowcorresponding to the IP-CAN Session stops (that is, when a data flow istransmitted on none of the IP-CAN Bearers in the IP-CAN Session); aftertiming duration exceeds the session keeping time threshold, the Gatewayinitiates a session termination request to the OCS, where the sessiontermination request is a Credit Control Request-Terminate (CCR-T). Ifthe Gateway detects, in a timing process, that another data flow istransmitted in the corresponding IP-CAN Session, the foregoing timing iszeroed out, and timing restarts when transmission of the another dataflow stops.

Method 2: The Gateway receives a session keeping time threshold carriedin charging information that is sent by an OCS through a Gy interface,where the session keeping time threshold may be named asSession-Keeping-Time. After the PCEF receives the threshold, in ordernot to affect an existing quota management mechanism, the Gateway reactsdifferently according to whether a quota has a correspondingQuota-Holding-Time, which is : if the quota has a Quota-Holding-Timedelivered by the OCS, the Gateway starts timing when Quota-Holding-Timesof all quotas in the IP-CAN Session expire (that is, when there is nooccupied quota in the IP-CAN Session); if the quota has no correspondingQuota-Holding-Time, after determining that the PCEF has the sessionkeeping time threshold, the PCEF starts timing when transmission of adata flow in the PCEF stops, and when timing duration exceeds thesession keeping time threshold, the PCEF initiates a session terminationrequest CCR-T to the OCS. If another data flow is transmitted in theIP-CAN Session or the Gateway requests for a new quota in a timingprocess, the timing is zeroed out, and timing restarts when a timingcondition is met, where the timing condition is: there is no quotaoccupied and transmission of a data flow in the PCEF stops. A value ofthe Session-Keeping-Time may also be 0, and in this case, after theQuota-Holding-Times of all the quotas expire, the PCEF immediatelyinitiates the session termination request CCR-T.

Method 3: The Gateway may use a manner in which the Gateway configures aSession-Keeping-Time. For a value of the Session-Keeping-Time and anoperation manner, reference may be made to method 1 or method 2, anddetails are not described herein again.

Method 4: When the Gateway receives a charging session terminationinstruction from the charging system, the session termination conditionis met. The charging session termination instruction is sent only whenthe charging system determines that there is no quota occupied for theIP-CAN session and no new quota request for the IP-CAN session isreceived within the time threshold.

In the prior art, due to quota expiration, in some cases (for example,the quota expiration is reported to the OCS), the PCEF automaticallyrequests for a new quota; in this way, there is always an occupiedquota. Therefore, in method 2, to implement the method of the presentdisclosure, the operation of automatically requesting for a new quotaneeds to be changed: automatically requesting for a new quota iscanceled, and instead, after the quota expiration, the PCEF does notautomatically request for a new quota but initiates an operation ofrequesting for a new quota when a user requests a next service.

According to the descriptions of the foregoing method processes, a mainprocess of this embodiment of the present disclosure is described.However, in specific implementation, the following points need to bedescribed in the present disclosure, including: how to implement themethod of the present disclosure based on an OFCS; how to apply themethod of the present disclosure to establishment of a session between aPCRF and a TDF; and how to, on this basis, further reduce a waste ofcore network resources in an Always-on mode by expanding a chargingsession manner between a PCEF and an OCS. The following describes thepoints one by one with reference to flowcharts. It should be emphasizedthat a person skilled in the art may implement, based only on thedisclosed implementation manners, the points separately or in a combinedmanner without creative efforts, and the implementation shall fallwithin the protection scope of the present disclosure.

Implementation of an embodiment of the present disclosure is introducedusing a method process corresponding to FIG. 5, where a charging systemis preferably an OCS. A charging system includes an online chargingsystem OCS and an OFCS. The following describes implementation of anembodiment of the present disclosure in an OFCS environment withreference to FIG. 5. A Gateway is directly represented by a network nodePCEF. The OCS and the OFCS may be simultaneously used in the chargingsystem. Therefore, a person skilled in the art can work out a manner ofcombining the OCS and the OFCS with reference to implementation content,respectively based on the OCS and the OFCS, disclosed in the presentdisclosure.

Step 301: A PCEF receives an IP-CAN bearer establishment requestinitiated by UE.

Step 302: The PCEF sends an IP-CAN bearer establishment response to theUE, to complete establishment of an IP-CAN bearer.

Step 303: The PCEF monitors data flow transmission on the IP-CAN bearer,and establishes a charging session with an OFCS when detecting that adata flow is transmitted on the IP-CAN bearer.

Step 304: When determining that a session termination condition is met,the PCEF terminates the charging session that has been establishedbetween the PCEF and the OFCS; and establishes a new charging sessionfor the IP-CAN bearer when detecting that a new data flow is transmittedon the IP-CAN bearer.

The session termination condition may be preconfigured in the PCEF ormay be carried in a charging and control policy acquired from a PCRF bythe PCEF. A manner of terminating, by the PCEF when determining that asession termination condition is met, the charging session that has beenestablished between the PCEF and the OFCS includes:

(1) The Gateway monitors the IP-CAN bearer; in a case in which theGateway determines that no data flow is on the IP-CAN bearer, theGateway starts timing; and when determining that no data flow istransmitted on the IP-CAN bearer within a time threshold, the Gatewayterminates the charging session established for the IP-CAN bearer.

(2) When determining that there is no occupied quota on the IP-CANbearer, the Gateway starts timing; and when detecting that no new dataflow is transmitted on the IP-CAN bearer within a time threshold, theGateway terminates the charging session established for the IP-CANbearer.

In this embodiment, when an IP-CAN bearer is established, transmissionof a charged data flow is probably not involved. Therefore, when theIP-CAN bearer is established, the charging session is not immediatelyestablished for the established bearer. Further, when a sessiontermination condition is met, the charging session that has beenestablished between the PCEF and the OFCS is terminated. According tothe delay and termination manners, resources used for establishing acharging session are reduced while user communication is ensured.

The embodiment for implementing the present disclosure in the OFCS isvery similar to the embodiment that is for implementing the presentdisclosure in the OCS and that corresponds to FIG. 4, but specificcharging manners in the two embodiments have some differences. Thefollowing is a further improvement solution based on the embodiment inFIG. 5.

If a Charging Data Function (CDF) may further be built in the Gateway inwhich the PCEF is located, the charging session is not establishedbetween the PCEF and the OFCS, and step 303 and step 304 are replacedwith step 303′ and step 304′ for execution, which, as shown in FIG. 6,are as follows:

Step 303′: The PCEF does not create a new Charging Data Record (CDR),for the IP-CAN bearer temporarily, but monitors whether a data flow onthe IP-CAN bearer is started, and creates a new CDR when a data flowtransmission starts.

Step 304′: The PCEF closes the CDR when determining that a sessiontermination condition is met.

In the foregoing optional solution, based on the embodimentcorresponding to FIG. 5, a feature of offline charging is furtherexplored, and resource use efficiency is further improved with referenceto a core disclosure point of the present disclosure so that creationand disabling of a CDR can be closely combined with a current status ofa data flow in a PCEF, avoiding ineffective use of resources.

The foregoing describes in a process of establishing the chargingsession, how to use a method of the present disclosure to reduceresources used for establishing the charging session. An idea of thepresent disclosure may further be used in an Sd session between a PCRFand a TDF, of which a processing process is shown in FIG. 7.Establishment of the Sd session may be applied together with theimprovement methods in the embodiments corresponding to FIG. 3 and FIG.4. A person skilled in the art can also combine the foregoingembodiments for implementation based on the solutions of the foregoingembodiments and with reference to a use manner of a Gx interface, a Gyinterface, an Sd interface, or the like in the prior art. An IP-CANsession is represented as an IP-CAN Session, and an IP-CAN bearer isrepresented as an IP-CAN Bearer.

Step 401: A PCRF has established a Gx interface with a PCEF; the PCRFestablishes no Sd session with a TDF temporarily, but adds, to adelivered charging and control policy using a Gx session, a policy inwhich the PCEF is instructed to monitor a data flow status and report arelated event.

Step 402: When detecting that a data flow transmission starts passingthrough any IP-CAN Bearer in an IP-CAN Session, the PCEF performs step403; if the PCEF monitors that no data stream passes through an IPconnection bearer in an IP-CAN session, the PCEF continues monitoringdata traffic in the IP-CAN Session.

Step 403: When detecting that the data flow transmission starts to betransmitted, the PCEF suspends transmission of the detected data flow tothe TDF, and reports a data flow transmission event to the PCRF.

Step 404: The PCRF initiates an Sd session establishment request to thecorresponding TDF, and delivers an ADC rule using the established Sdsession.

Step 405: After the ADC rule is delivered, the PCRF returns an eventreport response message to the PCEF.

Step 406: The PCEF sends the data flow to the TDF according to the ADCrule.

Step 407: The PCEF monitors data flow transmission in the IP-CANSession, and reports a data flow transmission end event to the PCRF whendetecting that the data flow transmission in the IP-CAN Session stops.

Step 408: When determining, according to the event reported by the PCEF,that no data flow is transmitted on the IP-CAN bearer within a timethreshold, the PCRF performs an operation in step 409 of terminating theSd session established for the IP-CAN Session.

The PCRF determines that no data flow is transmitted on the IP-CANbearer within the time threshold may be based on specific implementationof step 22 in FIG. 3, which is as follows:

The Gateway monitors the IP-CAN session (also referred to as IPconnection Session); the Gateway starts timing in a case in which theGateway determines that no data flow is in the IP-CAN session; whendetermining that no data flow is transmitted in the IP-CAN sessionwithin the time threshold, the Gateway terminates the charging sessionestablished for the IP-CAN session; and when determining that a dataflow stops transmitting in the IP-CAN session, the Gateway reports adata flow transmission end event to the PCRF.

The PCRF starts timing after receiving the data flow transmission endevent reported by the PCEF, and terminates the Sd session whenreceiving, within the time threshold, no new data flow transmissionevent sent by the PCEF.

In this embodiment of the present disclosure, a specific process ofestablishing and terminating an Sd session between a PCRF and a TDF isdescribed. On a basis of ensuring an Sd session function, the Sd sessionis established using a delay; when determining that no data flow istransmitted in the foregoing IP-CAN session within a time threshold, thePCRF determines a manner of terminating the Sd session, improving adeficiency in the prior art of a resource waste existing since creationof the Sd session.

In the foregoing embodiments, implementation of a charging sessionmanagement method with reference to the present disclosure is given fromthe perspective of online charging, offline charging, and an Sd sessionbetween a PCRF and a TDF. Therefore, the charging session managementmethod provided in the present disclosure may further probably beapplied to other modules in the communications field. Therefore, abroader method is protected next, so as to protect objects that probablybe covered by the present disclosure. As shown in FIG. 8, the methodincludes:

Step 501: A node 1 receives a message sent from a third party, and thenode 1 establishes a session between the node 1 and a node 2 accordingto the message.

Step 502: The node 1 monitors a data flow in the established session,and when the data flow between the third party and the node 1 starts tobe transmitted, the node 1 establishes a session with the node 2.

Step 503: When determining that a session termination condition is met,the node 1 terminates the session that has been established between thenode 1 and the node 2.

Step 504: When a new data flow between the node 1 and a requester startsto be transmitted, the node 1 re-establishes a session with the node 2.

In a first scenario, the node 1 is corresponding to the PCEF in theforegoing embodiments, the node 2 is corresponding to the OCS, the thirdparty is the UE, the session message is the bearer establishmentrequest, and a session that is established with a delay is the chargingsession. In a second scenario, the node 1 is corresponding to the PCEFin the foregoing embodiments, the node 2 is corresponding to the OFCS,the third party is the UE, and the session message is the bearerestablishment request. In a third scenario, the node 1 is correspondingto the PCRF in the foregoing embodiments, the node 2 is corresponding tothe TDF, the third party is the PCEF, the session message is a data flowstatus message reported by the PCEF, and the session is the Sd sessionthat is established with a delay. For specific process implementationmanners, refer to the embodiments, and details are not described hereinagain.

The foregoing embodiments of the present disclosure involving thecharging session management method are improvement in effective use of acharging session resource based on data flow monitoring. With regard tothe improvement in the charging session resource, improvement mayfurther be made to data flow quota management on an IP-CAN bearer. Thefollowing introduces an improvement manner for data flow quotamanagement performed by an OCS. To implement the quota managementimprovement method, a premise is: multiple IP-CAN Bearers in one IP-CANSession share a charging session. A specific process is shown in FIG. 9.

When a charging system is the OCS, a quota management manner is asfollows:

Step 601: A PCEF establishes an IP-CAN bearer with UE, and establishes acharging session with the OCS for an IP-CAN Session.

The PCEF may establish the IP-CAN bearer with the UE in a manner in theembodiments and/or embodiment corresponding to FIG. 3 and/or FIG. 4, anddetails are not described herein again.

Step 602: The PCEF requests for a quota for an RG of the IP-CAN Sessionto the OCS.

Step 603: The PCEF uses the RG quota when subsequently receiving atransmitted data flow, corresponding to the RG, in the IP-CAN Session.

, multiple IP-CAN Bearers are corresponding to one IP-CAN Session.Different IP-CAN Bearers probably have a same RG, and the PCEF requestsa quota for each RG in the IP-CAN session. If multiple IP-CAN Bearershave a same RG, flows corresponding to the same RG share a quota appliedfor the RG, and subsequently, if a new IP-CAN Bearer is established anda flow corresponding to the RG is on the new IP-CAN Bearer, the flowalso shares the quota applied for the RG

Based on the foregoing quota use manner, a corresponding charginginformation collection and reporting method is as follows:

Step 604: When collecting quota use information of a service data flow,the PCEF performs separate collection for each IP-CAN Bearer accordingto different QoS differentiation manners, that is, flows of a same RG ondifferent IP-CAN Bearers share a same quota, but use information iscollected separately.

Step 605: When a reporting condition is met, collected use volumes onthe different IP-CAN Bearers are reported separately, and QoS of thedata flow or QoS of the IP-CAN Bearer is added at the same time ofreporting. The QoS of the data stream or the QoS of the IP-CAN Bearer isused to differentiate the use volumes of different QoS in a reportingmessage.

That a reporting condition is met includes: a preconfigured timeinterval is reached, an allocated RG quota has been used up, a data flowon an IP-CAN Bearer ends or stops, or the like.

Besides the method implementation, the embodiments of the presentdisclosure further provide the following several kinds of correspondingapparatus implementation of a Gateway and a Policy and Charging RulesFunction entity, which are apparatus embodiments of the Gateway used toimplement the present disclosure as shown in FIG. 10 and FIG. 11 and anapparatus embodiment of the Policy and Charging Rules Function entityused to implement the present disclosure as shown in FIG. 12.

As shown in FIG. 10, FIG. 10 is a schematic structural diagram of aGateway for implementing a charging session management method accordingto an embodiment of the present disclosure, and the Gateway includes: aprocessor 704, a data transceiver 702, a signaling transceiver 703, anda memory 701.

The memory 701 is configured to store program code and a time thresholdthat are for the Gateway to perform an operation.

The data transceiver 702 is configured to transmit a data flow betweenthe Gateway and UE, and is further configured to transmit the data flowto another node on a network.

The signaling transceiver 703 is configured to establish a chargingsession with a charging system, and is further configured to transmit acharging and control policy to a PCRF.

The processor 704 is configured to read data from the memory 701 andcomplete the following functions based on the data transceiver 702 andthe signaling transceiver 703: when the charging session established forthe IP-CAN bearer exists between the data transceiver 702 and thecharging system, the processor 704 terminates the charging session ifdetermining that no data flow is transmitted on the IP-CAN bearer withinthe time threshold; and the processor 704 establishes a new chargingsession for the IP-CAN bearer using the signaling transceiver 703 whendetecting that a data flow transmission starts to be transmitted on theIP-CAN bearer.

Corresponding to implementation of the extended solution involvingestablishment of the first IP-CAN bearer in the embodiment in FIG. 3,the Gateway in this embodiment performs corresponding functions, thatis, when the Gateway is to establish a first IP-CAN bearer with the UE,the processor 704 establishes the first IP-CAN bearer with the UE usingthe data transceiver 702, and monitors data flow transmission on thefirst IP-CAN bearer; and the processor 704 establishes the chargingsession with the charging system using the signaling transceiver 703only when detecting, using the data transceiver 702, that a data flowtransmission starts to be transmitted on the first IP-CAN bearer.

Corresponding to implementation of UE authentication further included inthe extended solution involving establishment of the first IP-CAN bearerin the embodiment in FIG. 3, the Gateway in this embodiment performscorresponding functions, that is, when the first IP-CAN bearer is to beestablished, after the data transceiver 702 receives a request forestablishing the first IP-CAN bearer from the UE, the processor 704sends a charging and control policy request to the PCRF using thesignaling transceiver 703; the signaling transceiver 703 receives aresult that is of authentication performed by the OCS on the UE and thatis carried in a charging and control policy response returned by thePCRF, where the authentication performed by the OCS on the UE iscompleted by means of a session channel between the PCRF and the OCS;and the processor 704 establishes the first IP-CAN bearer using the datatransceiver 702 when determining that the UE has been authenticated, orrejects establishment of the bearer when determining that the UE failsto be authenticated.

Corresponding to implementation of the extended solution involvingdifferent manners of determining charging session termination in theembodiment in FIG. 3, the Gateway in this embodiment performscorresponding functions, that is, the processor 704 starts timing in acase in which the processor 704 determines that there is no data flow oroccupied quota on the IP-CAN bearer, and terminates the charging sessionwhen no new data flow is transmitted on the bearer within the timethreshold; or the processor 704 terminates the charging session whenreceiving a session termination request from the OCS, where the OCSstarts timing in a case in which there is no quota occupied on thecorresponding IP-CAN bearer, and the OCS sends the session terminationrequest to the Gateway when determining that no new quota request isreceived within the time threshold.

In this embodiment, a manner of acquiring the time threshold includes:the processor 704 acquires the time threshold from the memory 701; orthe time threshold is carried in the charging and control policyrequested by the processor 704 from the policy and charging rulesfunction PCRF using the signaling transceiver 703; or the time thresholdis acquired by the processor 704 using the charging session between thesignaling transceiver 703 and the OCS.

Corresponding to implementation of the extended solution involvingproviding data flow monitoring for the PCRF and reporting the relatedevent in the embodiment in FIG. 3, where the related event includes adata flow transmission event and a data flow transmission end event, theGateway in this embodiment needs to have corresponding functions,including: the signaling transceiver 703 receives an instruction,delivered by the PCRF, instructing the signaling transceiver 703 toreport a monitoring event when starting or ending of a data flowtransmission is detected; and the processor 704 reports the data flowtransmission event to the PCRF when detecting that the data flowtransmission starts; or reports the data flow transmission end event tothe PCRF when detecting that the data flow transmission ends so that thePCRF may determine to establish or terminate an Sd session according toa service data flow status.

Corresponding to implementation of the extended solution involvingproviding data flow monitoring and reporting for the PCRF in theembodiment in FIG. 3, the Gateway in this embodiment needs to havecorresponding functions, and that the processor 704 reports the dataflow transmission event to the PCRF when detecting that the data flowtransmission starts; or reports the data flow transmission end event tothe PCRF when detecting that the data flow transmission ends furtherincludes: when detecting that the data flow transmission starts, theprocessor 704 suspends data transmission and buffers received data usingthe memory 701, reports the data flow transmission event to the PCRF,and resumes the data transmission after receiving an event responsemessage returned by the PCRF.

Corresponding to implementation of the extended solution involvingsharing the charging session for the one or more IP-CAN bearers in theembodiment in FIG. 3, the Gateway in this embodiment needs to havecorresponding functions: if one IP-CAN session includes one or moreIP-CAN bearers, and the one or more IP-CAN bearers use the chargingsession established for the first IP-CAN bearer, the Gateway furtherincludes: the processor 704 terminates the charging session whendetecting that no data flow is transmitted on the one or more IP-CANbearers within the time threshold.

Corresponding to implementation of the extended solution involvingsharing the charging session for the one or more IP-CAN bearers in theembodiment in FIG. 3, the Gateway in this embodiment needs to havecorresponding functions: the processor 704 receives, using the signalingtransceiver 703, quotas that are allocated for different rating groupsRGs in the IP-CAN Session and that are delivered by the charging system;and the processor 704 uses a quota for flows that correspond to an RGand that are in the same IP-CAN Session; and the processor 704 collectsdata flow information on different IP-CAN Bearers, and separatelyreports the collected data flow information when a reporting conditionis met, where the data flow information includes QoS information of theIP-CAN Bearers so that the charging system charges the data flowsaccording to the QoS information.

Corresponding to implementation of the extended solution involvingsharing the charging session for the one or more IP-CAN bearers in theembodiment in FIG. 3, when the charging system is the OFCS, the Gatewayin this embodiment needs to have corresponding functions: the processor704 collects data flow information that is on different IP-CAN Bearersand that corresponds to a same RG, or a same RG+ServicelD, or a sameRG+SponsorlD, and separately reports the collected data flow informationwhen a reporting condition is met, where the data flow informationincludes the QoS information of the IP-CAN Bearers, and the ServiceID isa service identity corresponding to the data flow.

As shown in FIG. 11, FIG. 11 is a schematic structural diagram of aGateway for implementing a charging session management method accordingto an embodiment of the present disclosure, and the Gateway includes: aprocessor 804, a data transceiver 802, a signaling transceiver 803, anda memory 801.

The memory 801 is configured to store code and a time threshold that arefor the Gateway to perform an operation.

The data transceiver 802 is configured to complete transmission of adata flow to UE, and is further configured to transmit the data flow toanother node on a network.

The signaling transceiver 803 is configured to complete transmission ofcontent of a charging session to a charging system, and is furtherconfigured to complete transmission of a charging and control policy toa PCRF.

The processor 804 is configured to read data from the memory 801 andcomplete the following functions based on the data transceiver 802 andthe signaling transceiver 803: the data transceiver 802 receives anIP-CAN bearer establishment request sent by the UE; the processor 804establishes an IP-CAN bearer with the UE using the data transceiver 802,and monitors data flow transmission on the IP-CAN bearer; and theprocessor 804 establishes the charging session between the signalingtransceiver 803 and the charging system when detecting that a data flowtransmission starts to be transmitted on the IP-CAN bearer related tothe UE.

Corresponding to implementation of the extended solution involvingauthentication for the UE in the embodiment in FIG. 4, when the IP-CANbearer is to be established, the Gateway in this embodiment needs tohave corresponding functions: after the data transceiver 802 receivesthe IP-CAN bearer establishment request from the UE, the processor 804sends a charging and control policy request to the PCRF using thesignaling transceiver 803; the signaling transceiver 803 receives aresult that is of authentication performed by the OCS on the UE and thatis carried in a charging and control policy response returned by thePCRF, where the authentication performed by the OCS on the UE iscompleted by means of a session channel between the PCRF and the OCS;and the processor 804 establishes the IP-CAN bearer using the datatransceiver 802 when determining that the UE has been authenticated.

Corresponding to implementation of the extended solution in theembodiment in FIG. 4, where the extended solution involves that if oneIP-CAN session includes one or more IP-CAN bearers, and that the one ormore IP-CAN bearers use the charging session established for the firstIP-CAN bearer, the Gateway in this embodiment needs to havecorresponding functions: the processor 804 terminates the chargingsession when detecting that no data flow is transmitted on the one ormore IP-CAN bearers within the time threshold.

Corresponding to implementation of the extended solution in theembodiment in FIG. 4, where the extended solution involves that if oneIP-CAN session includes one or more IP-CAN bearers, and that the one ormore IP-CAN bearers use the charging session established for the firstIP-CAN bearer, in a case in which the charging system is the OCS, theGateway in this embodiment needs to have corresponding functions: theprocessor 804 receives, using the signaling transceiver 803, quotas thatare allocated for different rating groups RGs in the IP-CAN Session andthat are delivered by the charging system; and the processor 804 uses aquota for flows that correspond to an RG and that are on all IP-CANBearers in the same IP-CAN Session; and the processor 804 collects dataflow information on different IP-CAN Bearers, and separately reports thecollected data flow information when a reporting condition is met, wherethe data flow information includes QoS information of the IP-CAN Bearersso that the charging system charges the data flows according to the QoSinformation.

Corresponding to implementation of the extended solution in theembodiment in FIG. 4, where the extended solution involves that if oneIP-CAN session includes one or more IP-CAN bearers, and that the one ormore IP-CAN bearers use the charging session established for the firstIP-CAN bearer, in a case in which the charging system is the OFCS, theGateway in this embodiment needs to have corresponding functions: theprocessor 804 collects data flow information, on different IP-CANBearers, corresponding to a same RG, or a same RG+ServicelD, or a sameRG+SponsorlD, and separately reports the collected data flow informationwhen a reporting condition is met, where the data flow informationincludes QoS information of the IP-CAN Bearers.

As shown in FIG. 12, FIG. 12 is a schematic structural diagram of apolicy and charging rules function entity for implementing a chargingsession management method according to an embodiment of the presentdisclosure, and the policy and charging rules function entity includes:a processor 903, a signaling transceiver 902, and a memory 901.

The memory 901 is configured to store code for a Gateway to perform anoperation.

The signaling transceiver 902 is configured to transmit signaling to acharging system, is further configured to transmit a charging andcontrol policy to a PCEF, and is further configured to transmit contentin an Sd session to a TDF.

The processor 903 is configured to read data from the memory 901 andperform the following functions based on the data transceiver and thesignaling transceiver 902: if the Sd session is established between thesignaling transceiver 902 and the TDF for the IP-CAN session, afterreceiving a data flow transmission end event reported by the PCEF and ifdetermining that no data flow transmission event that is in the IP-CANsession and that is reported by the Gateway is received within a timethreshold, the processor 903 terminates the Sd session established forthe IP-CAN session; and when receiving, using the signaling transceiver902, another data flow transmission event that is in the IP-CAN sessionand that is reported by the Gateway, the processor 903 establishes a newSd session with the TDF for the IP-CAN session, so as to deliver a newapplication detection and control rule ADC rule.

Corresponding to implementation of the extended solution involving thatthe charging and control policy delivered by the PCRF carries the policyof data flow monitoring and reporting in the embodiment in FIG. 7, theGateway in this embodiment needs to have corresponding functions: theprocessor 903 returns a charging and control policy response to the PCEFusing the signaling transceiver 902, where the charging and controlpolicy response carries a charging and control policy in which the PCEFis required to monitor and report a data flow status in the IP-CANsession; and when the signaling transceiver 902 receives a data flowtransmission start event, in the IP-CAN session, monitored and reportedby the PCEF, the processor 903 establishes the Sd session for the IP-CANsession using the signaling transceiver 902, and sends the applicationdetection and control rule to the TDF using the Sd session.

Corresponding to implementation of the extended solution involving UEauthentication in the embodiment in FIG. 7, the Gateway in thisembodiment needs to have corresponding functions: the processor 903initiates an Sy session establishment request if determining that an Sysession needs to be established with an OCS, where the sessionestablishment request carries UE authentication information, so as torequest the OCS to authenticate the UE; receives an authenticationresult returned by the OCS; and generates the charging and controlpolicy according to the authentication result, where the charging andcontrol policy includes the authentication result.

Corresponding to implementation of the extended solution involving UEauthentication in the embodiment in FIG. 7, the Gateway in thisembodiment needs to have corresponding functions: before the PCRFestablishes the Sd session, the PCRF receives the policy and controlrequest sent by the PCEF; the processor 903 generates the charging andcontrol policy, where the charging and control policy includes chargingsession establishment delay instruction information, so as to instructthe Gateway to establish a charging session with the charging systemwhen a service data flow transmission starts; and the processor 903returns the charging and control policy to the PCEF using the signalingtransceiver 902.

When the functions are implemented in the form of a software functionalunit and sold or used as an independent product, the functions may bestored in a computer-readable storage medium. Based on such anunderstanding, the technical solutions of the present disclosureessentially, or the part contributing to the prior art, or some of thetechnical solutions may be implemented in a form of a software product.The software product is stored in a storage medium, and includes severalinstructions for instructing a computer device (which may be a personalcomputer, a server, or a network device) to perform all or some of thesteps of the methods described in the embodiments of the presentdisclosure. The foregoing storage medium includes: any medium that canstore program code, such as a Universal Serial bus (USB) flash drive, aremovable hard disk, a Read-Only Memory (ROM), a Random Access Memory(RAM), a magnetic disk, or an optical disc.

The foregoing descriptions are merely specific implementation manners ofthe present disclosure, but are not intended to limit the protectionscope of the present disclosure. Any variation or replacement readilyfigured out by a person skilled in the art within the technical scopedisclosed in the present disclosure shall fall within the protectionscope of the present disclosure. Therefore, the protection scope of thepresent disclosure shall be subject to the protection scope of theclaims.

What is claimed is:
 1. A charging session management method, whereinwhen a user equipment (UE) is in a state of already accessing to anetwork, there is an Internet Protocol (IP)-Connectivity Access Network(CAN) bearer between a Gateway and the UE, wherein the IP-CAN bearer isused to transmit a data flow of the UE, wherein a charging sessionexists between the Gateway and a charging system, and wherein the methodcomprises: terminating, by the Gateway, the charging session whendetermining that no data flow is transmitted on the IP-CAN bearer withina time threshold and when a charging session established for the IP-CANbearer exists between the Gateway and the charging system; andestablishing, by the Gateway, a new charging session for the IP-CANbearer when detecting that a data flow transmission starts to betransmitted on the IP-CAN bearer.
 2. The method according to claim 1,wherein when the Gateway is to establish a first IP-CAN bearer with theUE, the method further comprises: establishing, by the Gateway, thefirst IP-CAN bearer with the UE; monitoring a data flow transmissionstatus on the first IP-CAN bearer; and establishing, by the Gateway, acharging session with the charging system for the first IP-CAN bearerwhen detecting that a data flow transmission starts to be transmitted onthe first IP-CAN bearer.
 3. The method according to claim 2, wherein thecharging system is an online charging system (OCS), wherein beforemonitoring the data flow transmission status on the first IP-CAN bearer,the method further comprises: sending, by the Gateway, a charging andcontrol policy request to a policy and charging rules function (PCRF)entity after receiving a request for establishing the first IP-CANbearer from the UE; receiving, by the Gateway, a charging and controlpolicy response returned by the PCRF, wherein the response carries aresult of authentication performed by the OCS on the UE, wherein theauthentication performed by the OCS on the UE is completed by means of asession channel between the PCRF and the OCS, and wherein the firstIP-CAN bearer is established by the Gateway according to the result ofthe authentication.
 4. The method according to claim 1, wherein when oneIP-CAN session comprises one or more IP-CAN bearers and when the one ormore IP-CAN bearers use a charging session established for a firstIP-CAN bearer, the method further comprises terminating, by the Gateway,the charging session when detecting that no data flow is transmitted onthe one or more IP-CAN bearers within the time threshold.
 5. The methodaccording to claim 4, wherein the method further comprises: receiving,by the Gateway, quotas that are allocated for different rating groups(RGs) in the IP-CAN Session and that are delivered by the chargingsystem; and sharing, by the Gateway, a quota for data flows thatcorrespond to an RG and that are in the same IP-CAN Session.
 6. Themethod according to claim 4, wherein the method further comprises:collecting, by the Gateway, data flow information on different IP-CANBearers; and separately reporting the collected data flow informationwhen a reporting condition is met, and wherein the data flow informationcomprises QoS information of the IP-CAN Bearers so that the chargingsystem charges the data flows according to the QoS information.
 7. Themethod according to claim 1, wherein terminating, by the Gateway, thecharging session when determining that no data flow is transmitted onthe IP-CAN bearer within a time threshold comprises: starting timing ina case in which the Gateway determines that there is no data flowtransmitted or occupied quota on the IP-CAN bearer, and terminating thecharging session when no new data flow is transmitted on the IP-CANbearer within the time threshold; or terminating, by the Gateway, thecharging session when receiving a session termination request from thecharging system, wherein the charging system starts timing in a case inwhich there is no quota occupied on the IP-CAN bearer, and wherein thecharging system sends the session termination request to the Gatewaywhen determining that no new quota request is received within the timethreshold.
 8. The method according to claim 1, wherein a manner ofacquiring the time threshold comprises: the Gateway acquires the timethreshold based on information preconfigured by the Gateway; or the timethreshold is carried in a charging and control policy requested by theGateway from the policy and charging rules function (PCRF); or the timethreshold is acquired from the OCS using the charging session.
 9. Themethod according to claim 1, wherein the method further comprises:receiving, by the Gateway, an instruction delivered by the PCRF; andreporting, by the Gateway according to the instruction delivered by thePCRF, a data flow transmission start event to the PCRF when detectingthat a data flow transmission starts; or reporting a data flowtransmission end event to the PCRF when detecting that a data flowtransmission ends so that the policy and charging rules function (PCRF)either determines to establish an Sd session with a traffic detectionfunction unit (TDF) according to the data flow transmission start event,or terminates an Sd session according to the data flow transmission endevent.
 10. The method according to claim 9, wherein reporting, by theGateway, a data flow transmission event to the PCRF when detecting thata data flow transmission starts or reporting a data flow transmissionend event to the PCRF when detecting that a data flow transmission endsfurther comprises the Gateway suspending data transmission and buffersreceived data, reporting the data flow transmission event to the PCRF,and resuming the data transmission after receiving an event responsemessage returned by the PCRF when the Gateway detects that the data flowtransmission starts.
 11. A charging session management method,comprising: receiving, by a Gateway, an internet protocol(IP)-Connectivity Access Network (CAN) bearer establishment request sentby user equipment (UE); establishing, by the Gateway, an IP-CAN bearerwith the UE; monitoring a data flow transmission status on the IP-CANbearer; and establishing, by the Gateway, a charging session with acharging system when detecting that a data flow transmission starts tobe transmitted on the IP-CAN bearer related to the UE.
 12. The methodaccording to claim 11, wherein when the IP-CAN bearer is to beestablished, the method further comprises: sending, by the Gateway, acharging and control policy request to a Policy and Charging RulesFunction (PCRF) after receiving the IP-CAN bearer establishment requestfrom the UE; receiving, by the Gateway, a charging and control policyresponse returned by the PCRF, wherein the response carries a result ofauthentication performed by an online charging system (OCS) on the UE,and wherein the result of the authentication performed by the OCS on theUE is sent through a session channel between the PCRF and the OCS; andestablishing, by the Gateway, the IP-CAN bearer when determining thatthe UE has been authenticated.
 13. The method according to claim 11,wherein when one IP-CAN session comprises one or more IP-CAN bearers andwhen the one or more IP-CAN bearers use a charging session establishedfor a first IP-CAN bearer, the method further comprises terminating, bythe Gateway, the charging session when detecting that no data flow istransmitted on the one or more IP-CAN bearers within a time threshold.14. The method according to claim 13, wherein the method furthercomprises: receiving, by the Gateway, quotas that are allocated fordifferent rating groups (RGs) in the IP-CAN Session and that aredelivered by the charging system; and sharing, by the Gateway, a quotafor data flows that correspond to an RG and that are in the same IP-CANSession.
 15. The method according to claim 13, wherein the methodfurther comprises: collecting, by the Gateway, data flow information ondifferent IP-CAN Bearers; and separately reporting the collected dataflow information when a reporting condition is met, and wherein the dataflow information comprises quality of service (QoS) information of theIP-CAN Bearers so that the charging system charges the data flowsaccording to the QoS information.
 16. A charging session managementmethod, wherein there is an internet protocol (IP)-connectivity accessnetwork (CAN) session between user equipment (UE) and a Gateway, whereina Policy and Charging Rules Function (PCRF) delivers, based on an Sdsession, an application detection and control rule (ADC) rule to atraffic detection function (TDF), and wherein the method comprises:terminating, by the PCRF, the Sd session established for the IP-CANsession when the Sd session is established between the PCRF and the TDFfor the IP-CAN session, after receiving a data flow transmission endevent reported by the Gateway and when determining that no data flowtransmission event that is in the IP-CAN session and that is reported bythe Gateway is received within a time threshold; and establishing, bythe PCRF, a new Sd session with the TDF for the IP-CAN session so as todeliver a new ADC rule when receiving another data flow transmissionevent that is in the IP-CAN session and that is reported by the Gateway.17. The method according to claim 16, wherein before the PCRFestablishes the Sd session, the PCRF returns a charging and controlpolicy response to the Gateway after receiving a charging and controlpolicy request sent by the Gateway, wherein the charging and controlpolicy response carries a charging and control policy that requires aPolicy and Charging Enforcement Function (PCEF) to monitor and report adata stream transmission status in the IP-CAN session, and wherein themethod further comprises: establishing, by the PCRF, the Sd session forthe IP-CAN session when the PCRF receives starting of data flowtransmission, in the IP-CAN session, monitored and reported by theGateway; and sending the application detection and control rule to theTDF using the Sd session.
 18. The method according to claim 16, whereinbefore the PCRF establishes the Sd session, the PCRF receives the policyand control request sent by the Gateway, and wherein the method furthercomprises: initiating, by the PCRF, an Sy session establishment requestwhen determining that an Sy session needs to be established with anonline charging system (OCS), wherein the session establishment requestcarries UE authentication information so as to request the OCS toauthenticate the UE; receiving an authentication result returned by theOCS; and generating the charging and control policy according to theauthentication result.
 19. The method according to claim 18, whereingenerating the charging and control policy according to theauthentication result comprises generating, by the PCRF, the chargingand control policy, and wherein the charging and control policycomprises the authentication result so as to instruct the Gateway toestablish the charging session with the OCS when a service data flowtransmission starts.
 20. A charging session management method, whereinwhen user equipment (UE) is in a state of accessing to a network, onlinecharging system (OCS) charges, using a charging session between the OCSand a Gateway, a data flow transmitted on an IP-CAN bearer between theGateway and the UE, and the method comprises: receiving, by the OCS, acharging session request message sent by the Gateway; and determining atime threshold for terminating the charging session, and delivering thetime threshold to the Gateway so that the Gateway monitors a sessiontermination condition according to the time threshold, and terminatesthe charging session when the termination condition is met; ordetermining, by the OCS, a time threshold for terminating the chargingsession, monitoring a quota delivered for an IP-CAN bearer correspondingto the charging session, starting timing when there is no occupied quotaon the IP-CAN bearer corresponding to the charging session, and whenreceiving no new quota request for the IP-CAN bearer corresponding tothe charging session within the time threshold, delivering a chargingsession termination request to the Gateway so that the Gatewayterminates the charging session according to the session terminationrequest.
 21. A Gateway for implementing a charging session managementmethod, wherein the Gateway comprises: a processor; a data transceiver;a signaling transceiver; and a memory, wherein the processor, the datatransceiver, the signaling transceiver, and the memory interact witheach other using a bus, wherein the memory is configured to store codeand a time threshold that are for the Gateway to perform an operation,wherein the data transceiver is configured to: transmit a data flow touser equipment (UE); and transmit the data flow to another node on anetwork, wherein the signaling transceiver is configured to: transmitcontent of a charging session to a charging system; and transmit acharging and control policy to a Policy and Charging Rules Function(PCRF), and wherein the processor is configured to read data from thememory and complete the following functions based on the datatransceiver and the signaling transceiver: the processor terminates thecharging session when determining that no data flow is transmitted onthe internet protocol (IP)-Connectivity access network (CAN) bearerwithin the time threshold and when the charging session established foran IP-CAN bearer exists between the signaling transceiver and thecharging system; and the processor establishes a new charging sessionfor the IP-CAN bearer when detecting that data flow transmission startson the IP-CAN bearer.
 22. The Gateway according to claim 21, whereinwhen the Gateway establishes a first IP-CAN bearer with the UE, theprocessor establishes the first IP-CAN bearer with the UE using the datatransceiver, and monitors data flow transmission on the first IP-CANbearer, and wherein the processor establishes the charging session withthe charging system using the signaling transceiver only when detecting,using the data transceiver, that a data flow transmission starts to betransmitted on the first IP-CAN bearer.
 23. The Gateway according toclaim 21, wherein when the first IP-CAN bearer is to be established andafter the data transceiver receives a request for establishing the firstIP-CAN bearer from the UE, the processor sends a charging and controlpolicy request to the PCRF using the signaling transceiver, wherein thesignaling transceiver receives a result that is of authenticationperformed by the charging system on the UE and that is carried in acharging and control policy response returned by the PCRF, wherein theauthentication performed by the charging system on the UE is completedby means of a session channel between the PCRF and the charging system,and wherein the processor establishes the first IP-CAN bearer using thedata transceiver when determining that the UE has been authenticated.24. The Gateway according to claim 21, wherein when one IP-CAN sessioncomprises one or more IP-CAN bearers and when the one or more IP-CANbearers use a charging session established for a first IP-CAN bearer,the processor terminates the charging session when detecting that nodata flow is transmitted on the one or more IP-CAN bearers within thetime threshold.
 25. The Gateway according to claim 24, wherein theprocessor receives, using the signaling transceiver, quotas that areallocated for different rating groups (RGs) in the IP-CAN Session andthat are delivered by the OCS, and wherein the processor shares a quotafor data flows that correspond to an RG and that are in the same IP-CANSession.
 26. The Gateway according to claim 25, wherein the processorcollects data flow information on different IP-CAN Bearers, andseparately reports the collected data flow information when a reportingcondition is met, and wherein the data flow information comprisesquality of service (QoS) information of the IP-CAN Bearers so that theOCS charges the data flows according to the QoS information.
 27. TheGateway according to claim 21, wherein the processor terminating thecharging session when determining that no data flow is transmitted onthe IP-CAN bearer within a time threshold comprises: the processorstarts timing in a case in which the processor determines that there isno data flow or occupied quota on the IP-CAN bearer, and terminates thecharging session when no new data flow is transmitted on the bearerwithin the time threshold; or the processor terminates the chargingsession when receiving a session termination request from the chargingsystem, wherein the charging system starts timing in a case in whichthere is no quota occupied on the IP-CAN bearer, and sends the sessiontermination request to the Gateway when determining that no new quotarequest is received within the time threshold.
 28. The Gateway accordingto claim 21, wherein the processor terminating the charging session ifdetermining that no data flow is transmitted on the IP-CAN bearer withina time threshold comprises the processor terminates all chargingsessions related to the UE when determining that no data flow istransmitted on the one or more IP-CAN bearers related to the UE withinthe time threshold.
 29. The Gateway according to claim 21, wherein amanner of acquiring the time threshold comprises: the processor acquiresthe time threshold from the memory; or the time threshold is carried inthe charging and control policy requested by the processor from thepolicy and charging rules function PCRF using the signaling transceiver;or the time threshold is acquired by the processor using the chargingsession between the signaling transceiver and the charging system. 30.The Gateway according to claim 21, further comprising: the signalingtransceiver receives an instruction delivered by the PCRF; and theprocessor reports, according to the instruction, a data flowtransmission event to the PCRF when detecting that a data flowtransmission starts; or reports a data flow transmission end event tothe PCRF when detecting that a data flow transmission ends.
 31. TheGateway according to claim 30, wherein the processor reporting a dataflow transmission event to the PCRF when detecting that a data flowtransmission starts or reporting a data flow transmission end event tothe PCRF when detecting that a data flow transmission ends furthercomprises: when detecting that the data flow transmission starts, theprocessor suspends data transmission and buffers received data using thememory, reports the data flow transmission event to the PCRF, andresumes the data transmission after receiving an event response messagereturned by the PCRF.
 32. A Gateway for implementing a charging sessionmanagement method, wherein the Gateway comprises: a processor; a datatransceiver; a signaling transceiver; and a memory, wherein theprocessor, the data transceiver, the signaling transceiver, and thememory interact with each other using a bus, wherein the memory isconfigured to store code and a time threshold that are for the Gatewayto perform an operation; wherein the data transceiver is configured to:transmit a data flow to user equipment (UE); and transmit the data flowto another node on a network, wherein the signaling transceiver isconfigured to: transmit content of a charging session to a chargingsystem; and transmit a charging and control policy to a Policy andCharging Rules Function (PCRF), wherein the processor is configured toread data from the memory and complete the following functions based onthe data transceiver and the signaling transceiver: the data transceiverreceives an internet protocol (IP)-Connectivity Access Network (CAN)bearer establishment request sent by the UE; the processor establishesan IP-CAN bearer with the UE using the data transceiver, and monitorsdata flow transmission on the IP-CAN bearer; and the processorestablishes the charging session between the signaling transceiver andthe charging system when detecting that a data flow transmission startsto be transmitted on the IP-CAN bearer related to the UE.
 33. TheGateway according to claim 32, wherein when the IP-CAN bearer is to beestablished, the Gateway further comprises: after the data transceiverreceives the IP-CAN bearer establishment request from the UE, theprocessor sends a charging and control policy request to the PCRF usingthe signaling transceiver; the signaling transceiver receives a resultthat is of authentication performed by the charging system on the UE andthat is carried in a charging and control policy response returned bythe PCRF, wherein the authentication performed by an online chargingsystem (OCS) on the UE is completed by means of a session channelbetween the PCRF and the charging system; and the processor establishesthe IP-CAN bearer using the data transceiver when determining that theUE has been authenticated.
 34. The Gateway according to claim 32,wherein when one IP-CAN session comprises one or more IP-CAN bearers andthe one or more IP-CAN bearers use a charging session established for afirst IP-CAN bearer, the processor terminates the charging session whendetecting that no data flow is transmitted on the one or more IP-CANbearers within the time threshold.
 35. The Gateway according to claim34, wherein the processor is further configured to: receive quotas thatare allocated for different rating groups (RGs) in the IP-CAN Sessionand that are delivered by the charging system; and the processor sharesa quota for data flows that correspond to an RG and that are in the sameIP-CAN Session.
 36. The Gateway according to claim 35, wherein theprocessor is further configured to: collect data flow information ondifferent IP-CAN Bearers; and separately report the collected data flowinformation when a reporting condition is met, and wherein the data flowinformation comprises quality of service (QoS) information of the IP-CANBearers so that the charging system charges the data flows according tothe QoS information.
 37. A policy and charging rules function entity forimplementing a charging session management method, wherein the policyand charging rules function entity comprises: a processor; a signalingtransceiver; and a memory; wherein the processor, the signalingtransceiver, and the memory interact with each other using a bus,wherein the memory is configured to store code for a Gateway to performan operation, wherein the signaling transceiver is configured to:transmit signaling to a charging system; and transmit a charging andcontrol policy to the Gateway, and is further configured to transmitcontent in an Sd session to a traffic detection function (TDF), andwherein the processor is configured to read data from the memory andcomplete the following functions based on the signaling transceiver:when the Sd session is established between the signaling transceiver andthe TDF for an internet protocol (IP)-Connectivity Access Network (CAN)session, after receiving a data flow transmission end event reported bythe Gateway and when determining that no data flow transmission eventthat is in the IP-CAN session and that is reported by the Gateway isreceived within a time threshold, the processor terminates the Sdsession established for the IP-CAN session; and when receiving, usingthe signaling transceiver, another data flow transmission event that isin the IP-CAN session and that is reported by the Gateway, the processorestablishes a new Sd session with the TDF for the IP-CAN session so asto deliver a new application detection and control rule (ADC) rule. 38.The policy and charging rules function entity according to claim 37,wherein before the Policy and Charging Rules Function (PCRF) establishesthe Sd session with the TDF, the PCRF returns a charging and controlpolicy response to the Gateway after receiving a policy and controlrequest sent by the Gateway, wherein the processor returns the chargingand control policy response to the Gateway using the signalingtransceiver, wherein the charging and control policy response carries acharging and control policy in which the Gateway is required to monitorand report a data flow status in the IP-CAN session, and wherein whenthe signaling transceiver receives a data flow transmission start event,in the IP-CAN session, monitored and reported by the Gateway, theprocessor establishes the Sd session for the IP-CAN session using thesignaling transceiver, and sends the application detection and controlrule to the TDF using the Sd session.
 39. The policy and charging rulesfunction entity according to claim 37, wherein before the policy andcharging rules function entity establishes the Sd session, the policyand charging rules function entity receives the policy and controlrequest sent by the Gateway, and the processor: initiates an Sy sessionestablishment request if determining that an Sy session needs to beestablished with an online charging system (OCS), wherein the sessionestablishment request carries UE authentication information, so as torequest the OCS to authenticate the UE; receives an authenticationresult returned by the OCS; and generates the charging and controlpolicy according to the authentication result, wherein the charging andcontrol policy comprises the authentication result.
 40. The policy andcharging rules function entity according to claim 38, wherein before thepolicy and charging rules function entity establishes the Sd session,the policy and charging rules function entity receives the policy andcontrol request sent by the Gateway, wherein the processor generates thecharging and control policy, wherein the charging and control policycomprises charging session establishment delay instruction information,so as to instruct the Gateway to establish a charging session with thecharging system when a service data flow transmission starts, andwherein the processor returns the charging and control policy to theGateway using the signaling transceiver.